import request from '@/utils/request'

export default {
  //查询所有的教师信息
  getTeacherList() {
    return request({
      url: `eduservice/teacher/findAll`,
      method: 'GET'
    })
  },
  //分页查询讲师列表
  getTeacherListPage(current, limit, teacherQuery) {
    return request({
      url: `/eduservice/teacher/pageCondition/${current}/${limit}`,
      method: 'post',
      data: teacherQuery
    })
  },
  //删除讲师信息
  removeDataById(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'delete'
    })
  },
//新增讲师信息
  save(teacher) {
    return request({
      url: `/eduservice/teacher/addTeacher`,
      method: 'post',
      data: teacher
    })
  },
  //获取讲师详细信息
  getTeacherIno(id) {
    return request({
      url: `/eduservice/teacher/getTeacher/${id}`,
      method: 'get'
    })
  },
  //更新讲师信息
  updateTeacher(teacher) {
    return request({
      url: `/eduservice/teacher/updateTeacher`,
      method: 'post',
      data: teacher
    })
  }
}
